package com.learning.demos.jvmgc;

/**
 * @author adolphw
 *
 * 内存不够也不回收
 */
public class StrongReferenceDemo {
    public static void main(String[] args) {
        // 强引用
        Object object1 = new Object();
        Object object2 = object1;

        object1 = null;

        System.gc();
        System.out.println(object2);
    }
}
